package cn.iocoder.yudao.module.brokerage.merchant.pojo.vo;

import cn.iocoder.yudao.framework.business.basic.pojo.vo.BaseVO;
import cn.iocoder.yudao.framework.business.basic.pojo.vo.UserSimpleVO;
import cn.iocoder.yudao.framework.business.order.pojo.vo.OrderSnapshotVO;
import cn.iocoder.yudao.module.api.shop.info.dto.ShopInfoDTO;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Schema(description = "推广商家分佣记录 Response VO")
@Data
public class AdminBrokerageMerchantRecordVO extends BaseVO {

    @Schema(description = "招商人员用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long userId;

    @Schema(description = "招商人员用户信息")
    private UserSimpleVO user;

    @Schema(description = "交易单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "PRD202503102335")
    private String tradeNo;

    @Schema(description = "订单快照数据，JSON格式")
    @JsonIgnore
    private String orderSnapshot;

    @Schema(description = "订单数据")
    private OrderSnapshotVO orderItem;

    @Schema(description = "分佣比例，0-100之间的数字")
    private Double bonusPercent;

    @Schema(description = "分佣金额，单位为分")
    private Integer bonusMoney;

    @Schema(description = "来源用户编号")
    private Long sourceUserId;

    @Schema(description = "来源用户信息", requiredMode = Schema.RequiredMode.REQUIRED)
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private UserSimpleVO sourceUser;

    @Schema(description = "来源店铺编号")
    private Long sourceShopId;

    @Schema(description = "来源店铺信息", requiredMode = Schema.RequiredMode.REQUIRED)
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private ShopInfoDTO sourceShop;

    @Schema(description = "分佣基准金额，单位为分")
    private Integer basePrice;

    @Schema(description = "状态：0-待入账、1-已结算、2-已失效、3-已取消")
    private Integer status;

    @Schema(description = "解冻时间")
    private LocalDateTime unfreezeTime;

    @Schema(description = "取消时间")
    private LocalDateTime cancelTime;

    @Schema(description = "备注")
    private String note;

}